home *** CD-ROM | disk | FTP | other *** search
- package com.soap.net
- {
- import flash.display.DisplayObject;
- import flash.display.Loader;
- import flash.events.IOErrorEvent;
- import flash.net.URLRequest;
- import flash.net.URLRequestMethod;
- import flash.net.URLVariables;
- import flash.system.Capabilities;
- import flash.system.Security;
-
- public class Mochi
- {
-
- private static var self:Mochi;
-
-
- public function Mochi()
- {
- super();
- }
-
- public static function track(param1:DisplayObject, param2:String) : Mochi
- {
- var _loc3_:String = null;
- var _loc4_:URLVariables = null;
- var _loc5_:String = null;
- var _loc6_:URLRequest = null;
- var _loc7_:Loader = null;
- if(Security.sandboxType == "localWithFile")
- {
- return null;
- }
- self = new Mochi();
- Security.allowDomain("*");
- Security.allowInsecureDomain("*");
- _loc3_ = "http://core.mochibot.com/my/core.swf";
- (_loc4_ = new URLVariables())["sb"] = Security.sandboxType;
- _loc4_["v"] = Capabilities.version;
- _loc4_["swfid"] = param2;
- _loc4_["mv"] = "8";
- _loc4_["fv"] = "9";
- if((_loc5_ = param1.loaderInfo.loaderURL).indexOf("http") == 0)
- {
- _loc4_["url"] = _loc5_;
- }
- else
- {
- _loc4_["url"] = "local";
- }
- (_loc6_ = new URLRequest(_loc3_)).contentType = "application/x-www-form-urlencoded";
- _loc6_.method = URLRequestMethod.POST;
- _loc6_.data = _loc4_;
- (_loc7_ = new Loader()).contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,error);
- _loc7_.load(_loc6_);
- return self;
- }
-
- private static function error(param1:IOErrorEvent) : void
- {
- trace("error " + param1.text);
- }
- }
- }
-